package com.zzyl.mapper;

import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationCountVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CustomerReservationMapper {

    //预约
    void createReservation(Reservation reservation);

    //取消预约
    void updateReservation(Long id);

    //预约列表
    List<Reservation> findByPage(Integer status);

    //取消预约的次数
    Integer cancellationCount(Long userId, LocalDateTime begin , LocalDateTime end);

    //统计预约次数
    List<ReservationCountVo> countByTime(LocalDateTime begin, LocalDateTime end);

    //定时任务
    void executeTask(LocalDateTime now);

}
